﻿using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace MetroApp.Helper
{
    public static class ExtensionsHelper
    {
        public static void ToObservableCollection<T>(this List<T> list, ObservableCollection<T> observables)
        {
            foreach (T item in list)
            {
                observables.Add(item);
            }
        }

        public static ObservableCollection<T> ToObservableCollection<T>(this List<T> list)
        {
            ObservableCollection<T> observables = new ObservableCollection<T>();
            foreach (T item in list)
            {
                observables.Add(item);
            }
            return observables;
        }
    }
}
